# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-util-dfm
pkgver=1.1.1
pkgrel=1
pkgdesc='Qt-style Client and Server library wrapper for the Wayland libraries'
arch=(loong64 x86_64)
license=(LGPL)
url="https://github.com/linuxdeepin/util-dfm"
depends=(libisoburn libmediainfo qt5-base udisks2)
makedepends=(cmake ninja)
source=("https://github.com/linuxdeepin/util-dfm/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('080b70e09cdddee456543ae49991c0334746ee164d2004555a815837825563bd')

prepare() {
  sed -i 's/PERMISSIONS WORLD_EXECUTE/RUNTIME/' util-dfm-$pkgver/src/dfm-io/tools/CMakeLists.txt
}

build() {
  cmake -G Ninja -B build -S util-dfm-$pkgver
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
